package mrusanov.view

class PlayerTypeView(val images:Vector[PlayerSpriteInfo], val levels:Vector[Int]) {
  require(images.size - levels.size == 1, "Incorrect images and levels size!")

  def spriteForLevel(level:Int):PlayerSpriteInfo = {
    for (i <- 0 until levels.size) {
      if (level < levels(i)) {
        return images(i)
      }
    }

    images.last
  }

}
